import 'dart:ui';

class myColors {
  //主标题
  static const Color c_191919 = Color(0xFF191919);
  //辅标题
  static const Color c_707070 = Color(0xFF707070);
  //分割线 #D1D3D5
  static const Color c_divider = Color(0xFFB5B5B5);
  static const Color c_D1D3D5 = Color(0xFFB5B5B5);

  //背景色
  static const Color c_bg= Color(0xFFF6F6F9);
  //未选中
  static const Color c_F4F5F6= Color(0xFFF4F5F6);
  static const Color c_B51C21 = Color(0xFFB51C21);
  static const Color c_FF4142 = Color(0xFFFF4142);


  static const Color c_B5B5B5 = Color(0xFFB5B5B5);

  static const Color c_FBFBFB= Color(0xFFFBFBFB);

  static const Color c_FFF2F2= Color(0xFFFFF2F2);





  static const Color c_F89596= Color(0xFFF89596);
  static const Color c_C87C51= Color(0xFFFC87C51);

  static const Color c_FFF3DD = Color(0xFFFFF3DD);
  static const Color c_FF7777= Color(0xFFFF7777);
  static const Color c_FDE1E4 = Color(0xFFFDE1E4);
  static const Color c_580E04 = Color(0xFF580E04);



  static const Color primary = Color(0xFF2196F3);      // 主色调（蓝色）
  static const Color accent = Color(0xFFFFC107);       // 辅助色（黄色）
  static const Color white = Color(0xFFFFFFFF);    // 页面背景色
  static const Color text = Color(0xFF212121);          // 正文文字
  static const Color hint = Color(0xFF9E9E9E);          // 提示文字
  static const Color divider = Color(0xFFBDBDBD);       // 分割线
  static const Color c_303F9F = Color(0xFF303F9F);       // 分割线




  /// 主色（半透明）
  static const Color primary50 = Color(0x80303F9F); // 50% 透明度


  /// 文本颜色
  static const Color text2 = Color(0xFF333333);

  /// 辅助色
  static const Color secondary = Color(0xFF009688);

  /// 警告色
  static const Color warning = Color(0xFFFF9800);

  /// 错误色
  static const Color red = Color(0xFFF44336);

  /// 成功色
  static const Color success = Color(0xFF4CAF50);

  /// 灰色
  static const Color gray = Color(0xFF9E9E9E);



  /// 动态透明度颜色（如0.3表示 30% 透明）
  static Color withOpacity(Color color, double opacity) {
    return color.withOpacity(opacity);
  }

  /// ARGB 动态颜色
  static Color fromARGB(int a, int r, int g, int b) {
    return Color.fromARGB(a, r, g, b);
  }

  /// RGB 转 Color，默认不透明
  static Color fromRGB(int r, int g, int b) {
    return Color.fromARGB(255, r, g, b);
  }

  /// 十六进制转 Color（支持透明度），如 #FF303F9F、#80303F9F
  static Color fromHex(String hexString) {
    final buffer = StringBuffer();
    if (hexString.length == 6 || hexString.length == 7) buffer.write('FF'); // 默认不透明
    buffer.write(hexString.replaceFirst('#', ''));
    return Color(int.parse(buffer.toString(), radix: 16));
  }
}